home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 12179 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: dsi.unimi.it!moreld
  2. From: moreld@dsi.unimi.it (~ZIO BUDDA~)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: waning : const discard
  5. Date: 18 Mar 1996 15:16:52 GMT
  6. Organization: Computer Science Dep. - Milan University
  7. Message-ID: <4ijup4$b54@tic.sm.dsi.unimi.it>
  8. References: <4iju00$m68@tic.sm.dsi.unimi.it>
  9. NNTP-Posting-Host: tac.fddi.dsi.unimi.it
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. ~ZIO BUDDA~ (moreld@dsi.unimi.it) wrote:
  13. > Hi, my question is :
  14. > I use g++ 2.7.0 and the default Class String, but when I use in a program
  15. > a line like 
  16. > XDrawString(CXDisplay, CXWindow, CXGC, x, y, stringa, strlen(stringa));
  17.  
  18. > if I use stringa like char * all is ok, but if a say that stringa is a 
  19. > variable of Class String (aka String stringa;) the compiler
  20. > return me a warning that say me that the const is discard. 
  21. > Ok this is a warning, but I hate this warning. Help, this is for an exam
  22. > and my prof hate warning. 
  23.  
  24. sorry for my follow up, but if stringa is a variable of class String
  25. i use this line
  26. XDrawString(CXDisplay, CXWindow, CXGC, x, y, stringa.chars(), stringa.len());
  27.  
  28. again sorry
  29. --
  30. Zio Budda "sempre alla ricerca di un account..." moreld@ghost.dsi.unimi.it
  31. http://www.dsi.unimi.it/Users/Students/moreld/home.html
  32. Ask me for questions about LINUX and Games for PC, and see my home page 
  33. I'm a programmer and a consultant...
  34.  
  35. Tel. 02/2139959 ... Chiedere di Davide Michel
  36.